﻿@{
    var grid = Html.DevExpress().GridView(settings =>
    {
        settings.Name = "listBirthday";
        settings.CallbackRouteValues = new { Controller = "KhachHang", Action = "listBirthdayPartial"};
        settings.KeyFieldName = "maKH";
        settings.SettingsPager.Visible = true;
        settings.Settings.ShowGroupPanel = true;
        settings.Settings.ShowFilterRow = true;
        settings.SettingsBehavior.AllowSelectByRowClick = true;
        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);

        settings.Columns.Add(column =>
        {
            column.FieldName = "maKH";
            column.Caption = "Mã KH";
            column.ColumnType = MVCxGridViewColumnType.TextBox;
            column.FixedStyle = GridViewColumnFixedStyle.Left;
            column.Visible = false;
            column.Width = 100;
        });
        settings.Columns.Add(column =>
        {
            column.FieldName = "hoKH";
            column.Caption = "Họ";
            column.ColumnType = MVCxGridViewColumnType.TextBox;
            column.FixedStyle = GridViewColumnFixedStyle.Left;
            column.Width = 150;
        });
        settings.Columns.Add(column =>
        {
            column.FieldName = "tenKH";
            column.Caption = "Tên";
            column.ColumnType = MVCxGridViewColumnType.TextBox;
            column.FixedStyle = GridViewColumnFixedStyle.Left;
            column.Width = 80;
        });
        settings.Columns.Add(column =>
        {
            column.FieldName = "sdtKH";
            column.Caption = "Số điện thoại";
            column.ColumnType = MVCxGridViewColumnType.TextBox;
            column.Width = 100;
        });
        settings.Columns.Add(column =>
        {
            column.FieldName = "sinhNhatKH";
            column.Caption = "Sinh nhật";
            column.ColumnType = MVCxGridViewColumnType.DateEdit;
            column.Width = 100;
        });
        settings.Columns.Add(column =>
        {
            column.FieldName = "conlai";
            column.Caption = "Còn lại";
            column.ColumnType = MVCxGridViewColumnType.TextBox;
            column.Width = 100;
        });
    });
}
@grid.Bind(Model).GetHtml()